import http from "@/utils/request"
// 发送请求示例 
export function login() {
  	return http({
  	  	url: '/breed/dovecote/get/3',
  	  	method: 'get',
  	  	params: {
  	  	  baseId: 3,
  	  	  dovecoteNumber: 'A01'
  	  	}
  	});
}

// 获取验证码
export function getCaptcha2() {
  	return http({
  	  	url: '/authority/captcha',
  	  	method: 'get',
  	});
}

// 密码登陆
export function PasswordLogin(data){
  return http({
      	url:`/authority/user/login`,
      	method:'put',
      	data,
  })
}

// 获取用户信息
export function getUserInfo(){
    return http({
        url:'/authority/user',
        method:'get'
    })
}

// 获取用户所有的权限
export function getUserRole(){
    return http({
        url:'/authority/user/permission',
        method:'get'
    })
}

// 获取用户所能访问页面
export function getUserMenu(){
    return http({
        url:'/authority/user/new/permission',
        method:'get'
    })
}

// 获取用户所有角色
export function getAllRole(){
    return http({
        url: '/authority/role',
        method: 'get'
    })
}
